//
//  Common.swift
//  ZYweibo
//
//  Created by 张耀 on 16/6/25.
//  Copyright © 2016年 zhangyao. All rights reserved.
//

import UIKit
///微博相关数据
let APPKEY = "3780725648"
let APPSECRET = "ecdb48b20416038f439f667a9d145285"
let REDIRECT_URI = "http://www.baidu.com"

///屏幕的宽
let KUAN = UIScreen.mainScreen().bounds.width

///屏幕的高
let GAO = UIScreen.mainScreen().bounds.height

///主题颜色
let ZhuColor = UIColor.orangeColor()

///RGB
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{

    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1)

}

///随机颜色
func SuijiColor() ->UIColor{

    let r = CGFloat(random()%256)
    let g = CGFloat(random()%256)
    let b = CGFloat(random()%256)
    return RGB(r, green: g, blue: b)

}